import { AxiosRequestConfig } from 'axios';
import http from '@/utils/http';

export async function getStyles(config?: AxiosRequestConfig<any>) {
    const _config = <AxiosRequestConfig<any>>{
        url: '/api/CarStyle/GetCarStyleType',
        method: 'POST',
        ...config,
    };
    const response = await http.request(_config);
    return response.data;
}

export async function listProducts(config?: AxiosRequestConfig<any>) {
    const _config = <AxiosRequestConfig<any>>{
        url: '/api/CarStyle/GetCurrentCarStyles',
        method: 'POST',
        ...config,
    };
    const response = await http.request(_config);
    return response.data;
}

export async function getProduct(config?: AxiosRequestConfig<any>) {
    const _config = <AxiosRequestConfig<any>>{
        url: '/api/CarCategory/GetCurrentproductDesc',
        method: 'POST',
        ...config,
    };
    const response = await http.request(_config);
    return response.data;
}
